<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #pic{
            position: relative;
            width: 800px;
            height: 1000px;
            border: solid 1px red;
            margin: 0 auto;
        }
        #pic>div:nth-child(1){
            position: absolute;
            left: 50px;
            top: 30px;
            /*默认值为1*/
        }
        #pic>div:nth-child(2){
            position: absolute;
            left: 150px;
            top: 130px;
        }
        #pic>div:nth-child(1):hover{
            z-index: 4;
        }
    </style>
</head>
<body>
    <div id="pic">
        <div>
            <img src="../img/boy.png" alt="">
        </div>
        <div>
            <img src="../img/boy.png" alt="">
        </div>
    </div>
</body>
</html>